import Vue from "vue";
import VueRouter from 'vue-router';
import '../../node_modules/nprogress/nprogress.css'
import NProgress from 'nprogress'
Vue.use(VueRouter);

const router =new VueRouter({
    routes:[
        {path:'/login',component:()=> import( /* mylogin */ '@/components/login')},
        {path:'/',component:()=> import( /* mylogin */ '@/components/login')},
        {path:'/Goods',component:()=> import( /* myGoods */ '@/components/Goods')}
    ]
})
router.beforeEach((to,from,next) =>{
    NProgress.set(0.3);
    next()
})
router.afterEach((to,from) =>{
    NProgress.done()
})
export default   router